package com.tzbank.wisdom.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.tzbank.wisdom.service.TransactionService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
/**
 * 账户交易控制器
 * @author WDJ
 *
 */
@Api(tags = {"交易信息查询"})
@RestController
@RequestMapping("transaction")
@Slf4j
public class TransactionController {
	
	@Resource
	private TransactionService transactionService;
	

    
    /**
     * @param bankNo  银行号
     * @return
     */
    @PostMapping(value = "/superOnlineBank")
    @ApiOperation(value = "根据银行号判断银行是否是超级网银", notes = "根据银行号判断银行是否是超级网银")
	public Map<String,Object> superOnlineBank(@RequestBody Map<String,String> paramsMap){
		return transactionService.superOnlineBank(paramsMap);
	}
    
    /**
     * 根据银行号、城市编号查询银行网点
     * @param bankNo  银行号,cityCode 城市编号
     * @return
     */
    @PostMapping(value = "/bankNetwork")
    @ApiOperation(value = "根据银行号判断银行是否是超级网银", notes = "根据银行号判断银行是否是超级网银")
	public Map<String,Object> getBankNetworkByBankId(@RequestBody Map<String,String> paramsMap){
		return transactionService.getBankNetworkByBankId(paramsMap);
	}
    
    @PostMapping(value = "/queryTranFee")
    @ApiOperation(value = "跨行手续费查询", notes = "跨行手续费查询")
	public Map<String,Object> queryTranFee(@RequestBody Map<String,String> paramsMap){
		return transactionService.queryTranFee(paramsMap);
	}
    
    @PostMapping(value = "/transfer")
    @ApiOperation(value = "转账", notes = "转账")
	public Map<String,Object> transfer(@RequestBody Map<String,String> paramsMap){
		return transactionService.transfer(paramsMap);
	}
}
